home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 6 / dbf_tc.zip / D_BLANK.C < prev    next >
Text File  |  1987-06-06  |  700b  |  28 lines

  1. /* 
  2. **        file:        d_blank.c
  3. **        purpose:    routine to fill a record in memory with blanks.
  4. **        usage:    d = (struct DBF *)malloc(sizeof(struct DBF));
  5. **                    strcpy(d->filename,"filename.dbf");
  6. **                    d_open(d);
  7. **                    d_blank(d);
  8. **                    d_addrec(d);
  9. **                    d_close(d);
  10. **                    free(d);
  11. **        notes:    the above code fragment append a blank record to the end of the
  12. **                    dbiii file.
  13. **                    compile with "tcc -c d_blank".  include this file in dbf.lib
  14. **                    see dbf.h for structure of DBF
  15. **        author:    Mark Sadler
  16. **        revised:    6/6/87
  17. */ 
  18. #include <stdio.h>
  19. #include <mem.h>
  20. #include "dbf.h"
  21.  
  22. int d_blank(struct DBF *d)
  23. {
  24.     memset(d->record_ptr,'\x20',d->record_length);
  25.     return(0);
  26. }
  27.  
  28.